#include "bo3d.h"

// Retrieves the Pass with the given index. 
BBDECL Ogre::Pass* __stdcall o_technique_getPass(Ogre::Technique* tech, unsigned short index)
{
	Ogre::Pass* p;
	try
	{
		p = tech->getPass(index);
	}
	catch(Ogre::Exception &e)
	{
		std::cout << e.getDescription() << std::endl;
	}

	return p;
}

// Retrieves the Pass matching name. 
BBDECL Ogre::Pass* __stdcall o_technique_getPassByName(Ogre::Technique* tech, const char* passName)
{
	Ogre::Pass* p;
	try
	{
		p = tech->getPass(Ogre::String(passName));
	}
	catch(Ogre::Exception &e)
	{
		std::cout << e.getDescription() << std::endl;
	}

	return p;
}